1. Field of the Invention
The present invention generally relates to a method for overlapping between graphic and video images, and more particularly to a method and system of adaptive pixel-based blending for overlapping between graphic and video images.
2. Description of the Prior Art
In the frame display field of the dynamic images, the single frame buffer architecture and the dual frame buffer architecture are usually used to merge and display graphic and video images. The dual frame buffer architecture is configured to blend two respectively separate frame buffers for displaying each pixel of an image, while the video image subsystem and the graphic image subsystem respectively uses a single frame buffer for processing. Since the pixel streams of the two subsystems are processed simultaneously, thus we consider that the pixels of graphic images are overlapped with the pixels of video images under that. Accordingly, when deciding not to display some pixels of graphic images, upon the pixels of video images that are under the pixels of graphic images will be displayed. In general, the method of deciding to alternatively display video images or graphic images in the dual frame buffer architecture is to find chroma keying by looking up a particular color entry of the color lookup table. Besides, another method of that is black detection; in this regard, using the principle that black is mostly easy to be detected and therefore takes black as one kind of chroma keying. Both of the two methods described above take the pixels of graphic images as transparency and then video images will be displayed when a particular color (for instance, chroma keying or black) in the pixel streams is detected.
Since many video image systems need to adopt the blending method of video and graphic images for display, they usually adopt the method for display of a particular block by using chroma keying or black detection. FIG. 1 depicts a conventional method for overlapping between graphic and video images. Display frame 150 is composed of video image 100 and graphic image 110, wherein video image 100 and graphic image 110 respectively send the corresponding pixels relative to display frame 150 at the same time. The overlapped area 120 of graphic image 110 can be filled with chroma keying, and using a detector 140 to detect whether it has chroma keying or not when the pixel streams of graphic image are sent to multiplexer 130. When the detecting result shows that it has chroma keying, and then multiplexer 130 chooses pixels of video image 100 for output; otherwise, choosing pixels of graphic image 110 for output.
Although we can use the method described above to make video images to be overlapped with graphic images, or blending video and graphic images with a certain blending factor for achieving an effect of transparency mix, but its flexibility is restricted. In this regard, for instance when using ¼ RGB color value of video image and ¾ RGB color value of graphic image as the pixels of a particular area for output, resulting in an effect of overlap and semi-transparency, but the method with fixed blending factor is less flexibility in the application of dynamic images. For instance, when requiring blending of overlapped area in different ways of transparency, or producing an effect of fade-in and fade-out, the flexibility of the method described above is restricted.